ALIM Web Implementation Guide

The FileOpener Element

The FileOpener section defines the handlers and MIME-type mappings used to determine what happens when a file is clicked in ALIM Web. It lets you configure the action taken per file type. The section is divided into two parts: DisplayHanders and MimeTypeMappings.

    <FileOpener xmlns="http://www.enterpriseinformatics.com/eB/Web/Configuration/FileOpenerConfiguration/1.0" default="10CC2E76-985A-4D3B-B54B-A7AE7789567A">
      <DisplayHandlers>
        <add id="1D89C853-64D0-489c-8981-8C3882A50400" url="/Framework/Endpoint/DownloadFile.ashx?fileID={0}" name="Open using Internet Explorer" />
        <add id="630A03AE-2C79-4153-9167-4F57B117DACF" url="~/PlugIns/DocumentManager/Media/Launch.aspx?o={0}&amp;t={1}" name="Download and open in native application" />
        <add id="10CC2E76-985A-4D3B-B54B-A7AE7789567A" url="/PlugIns/OTBravaViewer/Viewer/ViewSelection.aspx?o={0}&amp;t={1}" name="Open in Brava Viewer" />
      </DisplayHandlers>
      <MimeTypeMappings>
        <add mimeType="TEXT/XML" handler="1D89C853-64D0-489c-8981-8C3882A50400" />
        <add mimeType="APPLICATION/PDF" handler="1D89C853-64D0-489c-8981-8C3882A50400" />
        <add mimeType="TEXT/HTML" handler="1D89C853-64D0-489c-8981-8C3882A50400" />
      </MimeTypeMappings>
    </FileOpener>

The FileOpener element uses the namespace "http://www.enterpriseinformatics.com/eB/Web/ Configuration/FileOpenerConfiguration/1.0", the XSD schema of which is available in the AssetWise SDK.

The default Attribute

The default attribute in the FileOpener element specifies the GUID of the DisplayHandler entry which is to be the default display handler. In the example above, the GUID 10CC2E76-985A-4D3B-B54B-A7AE7789567A relates to the Brava viewer. If you want to change the default display handler, change the GUID of the default attribute to match the GUID of one of the other DisplayHandler entries.

<DisplayHandlers>

The DisplayHandlers element within the FileOpener element contains a list of applications that can handle viewing. This list is predefined by the installer, but you can edit the list to add or remove viewers.

Attribute Value Definition
id a GUID (required) Identifies the handler, this id is used to select the handler in the MimeTypeMappings element.
name a name (required) A readable name for the handler used for descriptive purposes when the handlers are listed for configuration.
url a URL path (required) The path of the page that the handler links the client to. This contains a {0} placeholder where the path expects the ID of a file to go.
assembly a name [Optional] - specifies the name of the assembly which is supplying the DisplayHandler object. If this attribute is included, the class element must also be supplied.
class a name [Optional] - specifies the name of the class for the DisplayHandler object. If this attribute is included, the assembly element must also be supplied.

<MimeTypeMappings>

The MimeTypeMappings element lists file MIME-types and the GUID of the display handler that should open them. This is used when the FileOpener is asked for the URL to handle a particular file, and it returns the URL from the DisplayHandler that is linked to the MIME-type of the file in AssetWise.

Note: A MIME-type can be listed multiple times, but the last entry defines the handler used.
Attribute Value Description
mimeType MIME-type name (required) The MIME-Type (for example, application/PDF) that the mapping refers to.
handler a GUID (required) Contains the GUID id of the DisplayHandlers entry which will receive files of this type to view.